<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>


<!--模块化导入 作用域互补干扰-->

<script type="module">
   import * as m2 from './demo02.js';
   import * as m1 from './demo01.js';
   import * as m3 from './demo03.js';
   import * as m4 from './demo04.js';


   //相同名字的变量 互不干扰

   console.log(m1.a);
   console.log(m2.a);
   console.log(m3.fn())
   console.log(m3.name)
   console.log(m4.name)
</script>
</body>
</html>